f.readline() reads a single line from the file; a newline character ( · -n ) is left at the end of the string, and is only omitted on the last line of the file ...
readline() reads from a file handle, starting at the current position (whatever that is, after a line, that's at the start of the next line) up to and ...
The Python File readline() method reads one entire line from the file. This method appends a trailing newline character ('-n') at the end of the line read.